import redis

r = redis.Redis(host='localhost', port=6379, db=0)

pattern = "202504*"
cursor = '0'
while cursor != 0:
    cursor, keys = r.scan(cursor=cursor, match=pattern)
    for key in keys:
        print(key.decode('utf-8'))

        r.delete(key.decode('utf-8'))

    
